package com.pda.gongpin.adapter;

import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;

import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.pda.gongpin.R;
import com.pda.gongpin.bean.ShipmentsDetailsBean;
import com.wangshen.base.ui.mvp.base.adapter.BaseAdapter;

import java.util.List;

public class ShipmentsAdapter extends BaseAdapter<ShipmentsDetailsBean.SkuDeliveryScheduleResultBean> {
    public ShipmentsAdapter(int layoutResId, @Nullable List<ShipmentsDetailsBean.SkuDeliveryScheduleResultBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ShipmentsDetailsBean.SkuDeliveryScheduleResultBean item) {
        super.convert(helper, item);
        helper.setText(R.id.tv_sku,item.getCacheStorageBin());
        RecyclerView recyclerView=helper.getView(R.id.rv_list);
        ShipmentsChildAdapter adapter=new ShipmentsChildAdapter(R.layout.item_text,item.getList());
        recyclerView.setAdapter(adapter);
    }
}
